package com.shanpin.shebao.model;

import java.math.BigDecimal;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Collections;
import java.util.List;
import java.util.Map;

import org.springframework.jdbc.core.RowMapper;

import com.shanpin.core.utils.DateUtil;

/**
 * 补缴订单详情
 * @author 品讯科技
 *
 */
public class PayOrderAdded {

	/**
	 * 补缴订单号(BJ开头)
	 */
	private String added_no;

	/**
	 * 标题
	 */
	private String title;
	
	/**
	 * 用户ID
	 */
	private int pay_uid;
	
	/**
	 * 身份证号
	 */
	private String id_card;
	
	/**
	 * 城市代码
	 */
	private int city_code;
	
	/**
	 * 原因
	 */
	private String reason;
	
	/**
	 * 订单号用英文逗号间隔
	 */
	private String orders;
	
	/**
	 * 月份用英文逗号间隔
	 */
	private String months;
	
	/**
	 * 支付流水号
	 */
	private String pay_no;
	
	/**
	 * 金额
	 */
	private BigDecimal amount;
	
	/**
	 * 状态1待支付 2已支付
	 */
	private int status;

	private String update_time;
	
	private List<Map<String, Object>> refundList = Collections.EMPTY_LIST;
	

	public static RowMapper<PayOrderAdded> detailMapper = new RowMapper<PayOrderAdded>() {

		@Override
		public PayOrderAdded mapRow(ResultSet rs, int rowNum)
				throws SQLException {
			PayOrderAdded p = new PayOrderAdded();
			p.added_no = rs.getString("added_no");
			p.amount = rs.getBigDecimal("amount");
			p.city_code = rs.getInt("city_code");
			p.id_card = rs.getString("id_card");
			p.months = rs.getString("months");
			p.orders = rs.getString("orders");
			p.pay_no = rs.getString("pay_no");
			p.pay_uid = rs.getInt("pay_uid");
			p.reason = rs.getString("reason");
			p.title = rs.getString("title");
			p.status = rs.getInt("status");
			p.update_time = DateUtil.dateStr(rs.getTimestamp("gen_time"));
			
			return p;

		}
	};


	public String getAdded_no() {
		return added_no;
	}


	public void setAdded_no(String added_no) {
		this.added_no = added_no;
	}


	public String getTitle() {
		return title;
	}


	public void setTitle(String title) {
		this.title = title;
	}


	public int getPay_uid() {
		return pay_uid;
	}


	public void setPay_uid(int pay_uid) {
		this.pay_uid = pay_uid;
	}


	public String getId_card() {
		return id_card;
	}


	public void setId_card(String id_card) {
		this.id_card = id_card;
	}


	public int getCity_code() {
		return city_code;
	}


	public void setCity_code(int city_code) {
		this.city_code = city_code;
	}


	public String getReason() {
		return reason;
	}


	public void setReason(String reason) {
		this.reason = reason;
	}


	public String getOrders() {
		return orders;
	}


	public void setOrders(String orders) {
		this.orders = orders;
	}


	public String getMonths() {
		return months;
	}


	public void setMonths(String months) {
		this.months = months;
	}


	public String getPay_no() {
		return pay_no;
	}


	public void setPay_no(String pay_no) {
		this.pay_no = pay_no;
	}


	public BigDecimal getAmount() {
		return amount;
	}


	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}


	public int getStatus() {
		return status;
	}


	public void setStatus(int status) {
		this.status = status;
	}


	public String getUpdate_time() {
		return update_time;
	}

	public void setUpdate_time(String update_time) {
		this.update_time = update_time;
	}


	public List<Map<String, Object>> getRefundList() {
		return refundList;
	}


	public void setRefundList(List<Map<String, Object>> refundList) {
		this.refundList = refundList;
	}
}
